
export const set = (key, data) => {
  wx.setStorageSync(key, data)
}

export const get = (key, defaultValue) => {
  return wx.getStorageSync(key) || defaultValue || ''
}

export const getUser = () => {
  return get('user')
}

export const getUserId = () => {
  return get('userid')
}

export const isLogin = () => {
  return !!getUserId();
}